#include <iostream>

#include "map.h"
//#include "AVLTree.h"
using namespace std;

int main()
{
	dzp::AVLTree<int, int > a;
	
	//int arr[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };
	int arr[] = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	//int arr[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 };
	for (auto e : arr)
	{
		a.insert(dzp::make_pair(e, e));
	}
	a.InOrder();
	cout << a.IsBalance();
	for (auto e : arr)
	{
		a.erase(e);
		cout << endl;
		a.InOrder();
		
		cout << a.IsBalance();
	}
	
	return 0;
}
